package cn.edu.scau.cmi.wujiaxian.exercise10;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class Example10_4 {
	
	//FileInputStream 和 FileOutputStream是字节的输入输出流
	public static void main(String[] args) {
		int n = - 1;
		byte[] bytes = new byte[100];
		File file = new File("C:\\Users\\lenovo\\git\\201734020124_wu_jiaxian\\201734020124吴嘉贤\\src\\cn\\edu\\scau\\cmi\\wujiaxian\\exercise10", 
						"Example10_4.java");
		try {
			FileInputStream in = new FileInputStream(file);
			while ((n = in.read(bytes, 0, 100)) != -1) {
				String s = new String(bytes, 0, n);
				System.out.println(s);
			}
			in.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}
	
}
